#pragma once
#include <string>
#include "Point.h"
#include "FishImpl.h"

// Factory Design Pattern
class FishFactory{

public:

	// type definition and constants for implementation selection
	typedef int FISH_TYPE;
	static const FISH_TYPE		GOLD_FISH;
	static const FISH_TYPE		SALMON;


	/* CreateFish creates a FishImpl object.
     * on mem. failure bad_alloc& is thrown
     */
	static FishImpl * CreateFish(FISH_TYPE impl, const Point& speed, const Point& location, bool transparent, int size);
	

	/* CopyFish copies the fish object according to it's rtti
     * on mem. failure bad_alloc& is thrown
     */
	static FishImpl * CopyFish(const FishImpl& fish);


private:
	// don't allow instanciations of the class
	FishFactory();
	~FishFactory();
	FishFactory(const FishFactory& fishFactory);
	const FishFactory& operator=(const FishFactory& fishFactory);
	
};